package rev1;

import java.util.Random;

public class MyString {

	String s;
	String key;
	String nodeId; // Used to "override hash function
	
	public MyString(String key, String val)
	{
		s = val;
		/*Random randomGenerator = new Random();
		this.hash = randomGenerator.nextInt(200);*/
		this.key = key;
	}
	public MyString(String key, String val, String nodeId)
	{
		this(key, val);
		this.nodeId = nodeId;
	}

	public String getMyString()	{ return s;	}
	public String getKey() { return key; }

	public String getHashCode() {
		return nodeId + "::" + this.key;
	}
	
}
